package com.fancy.action;

import com.fancy.dao.StudentDao;
import entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 *
 * @author Jackie
 * @date 2017/10/17
 */

@Controller
public class Test {


    @Autowired
    StudentDao studentDao;

    @RequestMapping("/test.do")
    @ResponseBody
    public String test(){
        List<Student> students = studentDao.findStudents();
        return students.toString();
    }
}
